package org.jeecg.modules.friends.enums;

/**
 * @author cold
 * @version 1.0
 * @data 2024/5/23 21:07
 */
public enum EducationTypeEnum {
    ASSOCIATE_DEGREE(1, "专科"),
    BACHELOR_DEGREE(2, "本科"),
    MASTERS_DEGREE(3, "研究生"),
    BOSHI_DEGREE(4, "博士生"),
    ;
    private int code;
    private String desc;

    EducationTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static EducationTypeEnum getEnumByName(String name) {
        for (EducationTypeEnum educationTypeEnum : values()) {
            if (educationTypeEnum.getDesc().equals(name)) {
                return educationTypeEnum;
            }
        }
        return null;
    }
}
